local canxu = fk.CreateSkill{
  name = "#plum__canxu_prohibit",
}

Fk:loadTranslationTable{ [canxu.name] = "掺虚" }

local getCanxuMark = function (player)
  local mark = player:getMark("canxu_viewas-turn")
  return type(mark) == "table" and mark or nil
end

canxu:addEffect("prohibit", {
  prohibit_use = function (self, player, card)
    local mark = getCanxuMark(player)
    if mark then
      if table.contains(mark[1], card.trueName) and table.contains(player:getCardIds("h"), card.id) then
        return true
      end
    end
  end,
  prohibit_response = function (self, player, card)
    local mark = getCanxuMark(player)
    if mark then
      if table.contains(mark[1], card.trueName) and table.contains(player:getCardIds("h"), card.id) then
        return true
      end
    end
  end
})

return canxu
